<template>
	<div>
		<!-- <input type="text" v-model="item" /> -->
		<!-- <button @click="$emit('addItem',item)"> + </button> -->
		<van-field 
		    left-icon="location-o" 
			v-model="item" 
			center 
			label="任务项" 
			placeholder="请输入任务项">
			<template #button>
				<van-button icon="setting-o" size="small" type="primary" @click="addItem(item)">增加</van-button>
			</template>
		</van-field>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				item: "输入一个新的任务内容....",
			}
		},
		props: {
			addItem: Function,
		}
	}
</script>

<style>
</style>
